package com.mj.haier.fin.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

import org.springframework.data.elasticsearch.annotations.Document;
import java.io.Serializable;
import java.time.Instant;
import java.util.Objects;

/**
 * The BdGvsItemconfig entity.
 * @author ycm
 */
@ApiModel(description = "The BdGvsItemconfig entity. @author ycm")
@Entity
@Table(name = "bd_gvs_itemconfig")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "bdgvsitemconfig")
public class BdGvsItemconfig implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 公司代码
     */
    @ApiModelProperty(value = "公司代码")
    @Column(name = "company_code")
    private String companyCode;

    /**
     * 项目, 唯一
     */
    @ApiModelProperty(value = "项目, 唯一")
    @Id
    @org.springframework.data.annotation.Id
    @Column(name = "source_name_code")
    private String sourceNameCode;

    /**
     * 三级小微
     */
    @ApiModelProperty(value = "三级小微")
    @Column(name = "department")
    private String department;

    /**
     * 三级小微名称
     */
    @ApiModelProperty(value = "三级小微名称")
    @Column(name = "department_name")
    private String departmentName;

    @Column(name = "validate_flag")
    private String validateFlag;

    @Column(name = "gmt_modified")
    private Instant gmtModified;

    @Column(name = "modify_user")
    private String modifiedUser;

    @Column(name = "gmt_create")
    private Instant gmtCreate;
    /**
     * 新增的操作的用户
     */
    @ApiModelProperty(value = "新增的操作的用户")
    @Column(name = "insert_user")
    private String insertUser;

    @Column(name = "source_name")
    private String sourceName;
    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove

    public String getCompanyCode() {
        return companyCode;
    }

    public BdGvsItemconfig companyCode(String companyCode) {
        this.companyCode = companyCode;
        return this;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getSourceNameCode() {
        return sourceNameCode;
    }

    public BdGvsItemconfig sourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
        return this;
    }

    public void setSourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
    }

    public String getDepartment() {
        return department;
    }

    public BdGvsItemconfig department(String department) {
        this.department = department;
        return this;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public BdGvsItemconfig departmentName(String departmentName) {
        this.departmentName = departmentName;
        return this;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getValidateFlag() {
        return validateFlag;
    }

    public BdGvsItemconfig validateFlag(String validateFlag) {
        this.validateFlag = validateFlag;
        return this;
    }

    public void setValidateFlag(String validateFlag) {
        this.validateFlag = validateFlag;
    }

    public Instant getGmtModified() {
        return gmtModified;
    }

    public BdGvsItemconfig gmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
        return this;
    }

    public void setGmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getModifiedUser() {
        return modifiedUser;
    }

    public BdGvsItemconfig modifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser;
        return this;
    }

    public void setModifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser;
    }

    public Instant getGmtCreate() {
        return gmtCreate;
    }

    public BdGvsItemconfig gmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
        return this;
    }

    public void setGmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
    }



    public String getInsertUser() {
        return insertUser;
    }

    public BdGvsItemconfig insertUser(String insertUser) {
        this.insertUser = insertUser;
        return this;
    }

    public void setInsertUser(String insertUser) {
        this.insertUser = insertUser;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        BdGvsItemconfig bdGvsItemconfig = (BdGvsItemconfig) o;
        if (bdGvsItemconfig.getSourceNameCode() == null || getSourceNameCode() == null) {
            return false;
        }
        return Objects.equals(getSourceNameCode(), bdGvsItemconfig.getSourceNameCode());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getSourceNameCode());
    }

    @Override
    public String toString() {
        return "BdGvsItemconfig{" +
            "companyCode='" + getCompanyCode() + "'" +
            ", sourceNameCode='" + getSourceNameCode() + "'" +
            ", department='" + getDepartment() + "'" +
            ", departmentName='" + getDepartmentName() + "'" +
            ", validateFlag='" + getValidateFlag() + "'" +
            ", gmtModified='" + getGmtModified() + "'" +
            ", modifiedUser='" + getModifiedUser() + "'" +
            ", gmtCreate='" + getGmtCreate() + "'" +
            ", insertUser='" + getInsertUser() + "'" +
            "}";
    }

    /**
     * @return the sourceName
     */
    public String getSourceName() {
        return sourceName;
    }

    /**
     * @param sourceName the sourceName to set
     */
    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    
}
